1. Technical Field
The present invention relates generally to the field of complex input/output subsystems and, more particularly, to a method, apparatus, and program for preserving data structures for hardware components discovery and initialization.
2. Description of Related Art
In the earliest initial power load (IPL) stage, system firmware must perform hardware discovery of the input/output (I/O) subsystem, then initialize and assign system address ranges according to the system memory map for the presenting hardware. Data structures are established and updated when the discovery and initialization are complete.
Later, in the open firmware stage of the IPL, the open firmware must create its open firmware device tree based on the current hardware in the system. Thus, the open firmware must repeat the discovery of hardware components and store a data structure to describe the hardware.
Finally, in the last stage of the IPL, the runtime abstraction service (RTAS) firmware needs to know the hardware information so that it can provide services to the operating system during runtime. RTAS also analyzes and isolates hardware problems when the system encounters some error exceptions during runtime. RTAS must also perform the discovery process and create a data structure to describe the hardware.
In the prior art, the data structure is not protected and, thus, is not available for later discovery, such during operating system startup. Therefore, it would be advantageous to preserve the data structure for hardware components in memory for discovery and initialization of complex I/O subsystems, and consequently eliminate duplicate discoveries.
The present invention preserves the data structures established in the earliest stage of hardware discovery. Thus, the data structure is available at later stages for other firmware components. In a logical partitioning machine, the open firmware partition manager can utilize the data structure to support the partition""s open firmware device tree construction. The partition manager customizes the copies of these data structures residing in the partition""s memory. For hardware devices in the system but not belonging to the partition, the device information is cleared and marked invalid.
After the data structures are established and updated by the earliest firmware I/O configuration component, the addresses of these structures are provided to the open firmware component. The open firmware copies these data structures to its internally safe working area and uses the copies for its normal operation.
When runtime abstraction service firmware component is instantiated, the addresses of the structures of open firmware""s copies are provided by the open firmware component to runtime abstraction service. Again, runtime abstraction service makes copies of these structures within its internally safe working space for its operation.